<?php

/* * 注意此文档为UTF-8的编码.
 * Created on 2010-5-28
 *
 * @author EXT <isrn@qq.com>
 *
 */
session_start();
header("Content-type: text/html; charset: UTF-8");
error_reporting(0);
define('ROOT_PATH', '/');
define('Js_path', '');
define('HTLJ', 'gl/'); //后台路径
define('CPOYRIGHT', 'prosperous'); //版权
define("DEFAULT_CHARSET", 'utf8');
define('BIC_ROOT', substr(dirname(__FILE__), 0, -8)); //网站目录
$class = array(
    array('name' => "Db", "args" => "sevenel", 'handle' => 'd_sevenel'),
    array('name' => "Tp", "args" => "", 'handle' => 'Tp')
);

/* 设置时区 */
if (function_exists('date_default_timezone_set')) {
    @date_default_timezone_set("Asia/Shanghai");
}
//防止SQL注入，如果访问的是后台就不需要包含此文件
if (!eregi(HTLJ, $_SERVER['PHP_SELF'])) {
    require_once ($_SERVER['DOCUMENT_ROOT'] . ROOT_PATH . "includes/filter.php");
}
//echo $_SERVER['DOCUMENT_ROOT'];
require_once ($_SERVER['DOCUMENT_ROOT'] . ROOT_PATH . "includes/function/base.php");
//require_once ($_SERVER['DOCUMENT_ROOT'].ROOT_PATH."includes/function/ext.php");
iniClass($class);
require_once ($_SERVER['DOCUMENT_ROOT'] . ROOT_PATH . "includes/classes/lm_page.php");
//$Tp->debugging=true;
require_once ($_SERVER['DOCUMENT_ROOT'] . ROOT_PATH . "includes/additional.php");
//print_r(Sys::getc());
mysql_query("set sql_mode=''");

require_once(BIC_ROOT . 'config.inc.php');

//初始化插件文件
$activate_plugin = BIC_ROOT . 'Plug-in/activate_plugin.php';
if (is_file($activate_plugin)) {
    require 'classes/plugin.php';
    require $activate_plugin;
    //global.php加载完成的钩子
    $plugin->trigger('global_end');
}
